<?php
/**
 * 
 * Sql auth adapter
 * 
 * @category Abovo
 * 
 * @package Abovo
 * 
 * @author Antti Holvikari <anttih@gmail.com>
 * 
 * @license http://opensource.org/licenses/bsd-license.php BSD
 * 
 */

/**
 * 
 * Sql auth adapter
 * 
 * @category Abovo
 * 
 * @package Abovo
 * 
 */
class Abovo_Auth_Adapter_Sql extends Solar_Auth_Adapter_Sql {
    
    /**
     * Config keys
     * 
     * Pre-defined config keys for Abovo's own auth table
     *
     * @var string
     */
    protected $_Abovo_Auth_Adapter_Sql = array(
        'table'      => 'auth',
        'handle_col' => 'handle',
        'passwd_col' => 'password',
    );
    
    /**
     * Constructor
     *
     * @return void
     */
    public function __construct($config = array())
    {
        parent::__construct($config);
        
        // make sure 'auth' table is created!
        // also, add it to registry
        if (! Solar::isRegistered('auth')) {
            Solar::register('auth', Solar::factory('Abovo_Model_Auth'));
        }
    }
}